#ifndef _SCHEMA_OPERATE_H_
#define _SCHEMA_OPERATE_H_

#include "/usr/include/mysql/mysql.h"
#include "keyword.h"
#include <list>
using namespace std;	

struct url_t;


int insert_to_url(MYSQL* mysql, url_t* url);
int insert_to_keyword(MYSQL* mysql, keyword_t* keyword);
int	insert_to_pending(MYSQL* mysql, url_t* url);	
int	insert_to_invalid(MYSQL* mysql, url_t* url);	
int	insert_to_dict(MYSQL* mysql, keyword_t* word);

int select_from_pending(MYSQL* mysql,unsigned int limit,list<url_t*>& urls);

int exist_in_pending(MYSQL* mysql, url_t* url);
int exist_in_invalid(MYSQL* mysql, url_t* url);
int exist_in_url(MYSQL* mysql, url_t* url);


int	delete_from_pending(MYSQL* mysql, url_t* url);	
int	delete_from_invalid(MYSQL* mysql, url_t* url);	



#endif

